﻿/*
 * Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
 * See https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers
 * for more information concerning the license and the contributors participating to this project.
 */

using System.Security.Claims;

namespace AspNet.Security.OAuth.Asana;

/// <summary>
/// Defines a set of options used by <see cref="AsanaAuthenticationHandler"/>.
/// </summary>
public class AsanaAuthenticationOptions : OAuthOptions
{
    public AsanaAuthenticationOptions()
    {
        ClaimsIssuer = AsanaAuthenticationDefaults.Issuer;
        CallbackPath = AsanaAuthenticationDefaults.CallbackPath;

        AuthorizationEndpoint = AsanaAuthenticationDefaults.AuthorizationEndpoint;
        TokenEndpoint = AsanaAuthenticationDefaults.TokenEndpoint;
        UserInformationEndpoint = AsanaAuthenticationDefaults.UserInformationEndpoint;

        ClaimActions.MapJsonKey(ClaimTypes.NameIdentifier, "id");
        ClaimActions.MapJsonKey(ClaimTypes.Name, "name");
        ClaimActions.MapJsonKey(ClaimTypes.Email, "email");
    }
}
